package br.com.biavan.tudo;

import java.awt.Color;
import java.awt.DisplayMode;
import java.awt.Font;
import java.awt.Graphics;

import javax.swing.JFrame;

public class Bucky extends JFrame{
	public static void main(String[] args) {
		
		/* Exemplo de thread
		Thread t1 = new Thread(new Apple("Um"));
		Thread t2 = new Thread(new Apple("Dois"));
		Thread t3 = new Thread(new Apple("Três"));
		t1.start();
		t2.start();
		t3.start();
		*/
		
		DisplayMode dm = new DisplayMode(800, 600, 16, DisplayMode.REFRESH_RATE_UNKNOWN);
		Bucky b = new Bucky();
		b.run(dm);
		
	}
	
	public void run(DisplayMode dm) {
		setBackground(Color.PINK);
		setForeground(Color.WHITE);
		setFont(new Font("Arial", Font.PLAIN, 24));
		
		Screen s = new Screen();
		try {
			s.setFullScreen(dm, this);
			try {
				Thread.sleep(50000);
			} catch(Exception e) {
				System.out.println("ERROR: " + e.getMessage());				
			}
		} catch(Exception e) {
			System.out.println("ERROR: " + e.getMessage());
		} finally {
			s.restoreScreen();
		}
	}
	
	public void paint(Graphics g) {
		g.drawString("Vamos ver o que aparece", 200, 200);
	}
}
